package com.education.ai.service;

import com.education.ai.entity.KnowledgePoint;

import java.util.List;
import java.util.Map;
import java.util.Optional;

/**
 * 知识点服务接口
 */
public interface KnowledgePointService {
    
    /**
     * 获取所有知识点
     */
    List<KnowledgePoint> getAllKnowledgePoints();
    
    /**
     * 根据ID获取知识点
     */
    Optional<KnowledgePoint> getKnowledgePointById(Long id);
    
    /**
     * 根据学科获取知识点
     */
    List<KnowledgePoint> getKnowledgePointsBySubject(String subject);
    
    /**
     * 根据学科和年级获取知识点
     */
    List<KnowledgePoint> getKnowledgePointsBySubjectAndGrade(String subject, String grade);
    
    /**
     * 保存知识点
     */
    KnowledgePoint saveKnowledgePoint(KnowledgePoint knowledgePoint);
    
    /**
     * 删除知识点
     */
    void deleteKnowledgePoint(Long id);
    
    /**
     * 获取知识点层次结构
     */
    Map<Long, List<KnowledgePoint>> getKnowledgeHierarchy(String subject);
    
    /**
     * 根据名称模糊查询知识点
     */
    List<KnowledgePoint> searchKnowledgePoints(String name, String subject);
    
    /**
     * 获取某个知识点的所有子知识点
     */
    List<KnowledgePoint> getChildKnowledgePoints(Long parentId);
} 